/*
 * Chrono.h
 *
 *  Created on: 1 mars 2013
 *      Author: raph
 */

#ifndef CHRONO_H_
#define CHRONO_H_

#include <sys/time.h>

namespace raph
{

class Chrono
    {
    public:
	enum TIME
	    {
	    SEC,
	    MSEC,
	    USEC
	    };
    private:
	struct timeval m_tv1;
	struct timeval m_tv2;

    public:
	void start();
	unsigned long long int stop(TIME = USEC);
    };

} /* namespace rc */
#endif /* CHRONO_H_ */
